using System;
using System.Collections;
using System.Collections.Generic;
using FrameWork;
using TMPro;
using UnityEngine;

public class Tip : MonoBehaviour
{
    [SerializeField] private TMP_Text tipText;
    [SerializeField] private float tipDisableTime;

    public void SetTip(string tip)
    {
        tipText.text = "";
        tipText.text = tip;
    }

    private void OnEnable()
    {
        Invoke("Remove", tipDisableTime);
    }

    private void Remove()
    {
        ObjectPool.Instance.Replace("Tip", this.gameObject);
    }
}
